

package com.hazelcast.internal.config;

import com.hazelcast.config.ExecutorConfig;

import javax.annotation.Nullable;

/**
 * Configuration for Executor(Read Only)
 */
public class ExecutorConfigReadOnly extends ExecutorConfig {

    public ExecutorConfigReadOnly(ExecutorConfig config) {
        super(config);
    }

    @Override
    public ExecutorConfig setName(String name) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }

    @Override
    public ExecutorConfig setPoolSize(int poolSize) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }

    @Override
    public ExecutorConfig setQueueCapacity(int queueCapacity) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }

    @Override
    public ExecutorConfig setStatisticsEnabled(boolean statisticsEnabled) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }

    @Override
    public ExecutorConfig setSplitBrainProtectionName(String splitBrainProtectionName) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }

    @Override
    public ExecutorConfig setUserCodeNamespace(@Nullable String userCodeNamespace) {
        throw new UnsupportedOperationException("This config is read-only executor: " + getName());
    }
}
